<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
  <title>knowledge</title>
  <link rel="stylesheet" href="/static/css/default.css">
  <link rel="stylesheet" href="/static/css/header.css">
  <link rel="stylesheet" href="/static/css/home.css">
  <link rel="stylesheet" href="//at.alicdn.com/t/font_2642872_ycqfb6xdewa.css">
</head>

<body>
  <div class="app">
    <%- include('common/header', {links: links}); %>
      <div class="content home-content" >
        <% list.forEach(function(panel){ %>
          <div class="home-content-item" data-url="<%=panel.name%>" onclick="goToPage(this)">
            <%- include('common/icon', {icon: panel.icon}); %>
              <p>
                <%=panel.name%>
              </p>
          </div>
          <% }); %>
      </div>
  </div>
  <script>
    function goToPage(target) {
      if (target) {
        const { url } = target.dataset
        window.location.href = `/page/${url}`
      }
    }
  </script>
</body>

</html>